package com.group3.service.mqservice;

import com.group3.common.topic.LiveTopic;
import com.group3.common.topic.NotificationTopic;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(topic = LiveTopic.LIVE_SECKILL_START, consumerGroup = "notification-seckill-group")
public class NotificationMqService implements RocketMQListener<String> {
    @Override
    public void onMessage(String activityId) {
        // 模拟发送短信/站内通知（
        log.info("收到秒杀活动启动消息，活动ID：{}", activityId);
        log.info("正在向用户发送秒杀提醒通知...");
    }
}